let arr = []
arr[0] = null
arr[3] = 2
for(let i = 0; i < arr.length; i++){
    console.log(arr[i]===undefined);
}
console.log(arr);